package de.lulusoft.anothertorrent.gui.views.Providers;

import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;

import de.lulusoft.anothertorrent.core.rtorrent.TorrentCommand;

public class TorrentCommandsViewLabelProvider implements ITableLabelProvider {

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		if (element instanceof TorrentCommand)
		{
			TorrentCommand tc = (TorrentCommand)element;
			switch (columnIndex)
			{
			case 0: return tc.getName();
			case 1: return tc.getCommand();
			}
		}
		return null;
	}

	@Override
	public void addListener(ILabelProviderListener listener) {
	}

	@Override
	public void dispose() {
	}

	@Override
	public boolean isLabelProperty(Object element, String property) {
		return false;
	}

	@Override
	public void removeListener(ILabelProviderListener listener) {
	}

}
